/**
 * Copyright (c) 2010 - 2018 Allinpay. All rights reserved.
 */
package com.allinpay.springBoot.springboot.serivce.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.allinpay.springBoot.springboot.dao.HdOrderInfoRepository;
import com.allinpay.springBoot.springboot.dao.pojo.HdOrderInfo;
import com.allinpay.springBoot.springboot.serivce.HdOrderInfoSerivce;

/**
 * TODO:
 *
 * @author tangjun
 * @date 2018-08-11
 */
@Service("HdOrderInfoSerivce")
public class HdOrderInfoSerivceImpl implements HdOrderInfoSerivce {

	@Autowired
	private HdOrderInfoRepository hdOrderInfoRepository;

	@Override
	public HdOrderInfo list(String orderId) {
		HdOrderInfo findOne = hdOrderInfoRepository.findOne(orderId);
		return findOne;
	}

	@Override
	@Cacheable(value = "test",key = "1111")
	public List<HdOrderInfo> pageList(String ordrId) {
		List<HdOrderInfo> findOne = hdOrderInfoRepository.findByOrderId(ordrId);
		return findOne;
	}

}
